package com.tinyengine.it.model.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * @TableName i_db_table_info
 */
@Data
@Accessors(chain = true)
public class DbTableFieldsInfoVo {
    private Integer id;

    @NotNull(message = "字段代码不能为空")
    @Schema(description = "字段代码")
    private String fieldCode;


    //@NotNull(message = "tableId不能为空")
    @Schema(description = "tableId")
    private Integer tableId;

    /**
     * 显示名称
     */
    @NotNull(message = "nameCh不能为空")
    @Schema(description = "显示名称")
    private String nameCh;

    /**
     * 主键 1/0
     */
    @Schema(description = "主键 1/0")
    private Boolean primaryKey;

    /**
     * 不为空 1/0
     */
    @Schema(description = "不为空 1/0")
    private Boolean notEmpty;

    /**
     * 自增  1/0
     */
    @Schema(description = "自增  1/0")
    private Boolean increment;

    /**
     * 数据类型
     */
    @NotNull(message = "数据类型不能为空")
    @Schema(description = "数据类型")
    private String dataType;

    /**
     * 长度
     */
    @Schema(description = "长度")
    private Integer length;

    /**
     * 小数位数
     */
    @Schema(description = "小数位数")
    private Integer decimalPlaces;

    /**
     * 说明
     */
    @Schema(description = "说明")
    private String description;

    /**
     * 数据字典
     */
    @Schema(description = "数据字典")
    private Integer dictId;

    /**
     * 默认值
     */
    @Schema(description = "默认值")
    private String defaultVal;

}